import type { FC } from "react";
import Icon from "@ant-design/icons";

interface IProps {
  svg: SvgComponent;
  fill?: string;
}

const renderSvgIcon = (Icon: SvgComponent, fill = "currentColor") => {
  return (props: SvgProps) => <Icon {...props} fill={fill} />;
};

const IconPro: FC<IProps> = (props) => {
  const { svg, fill } = props;
  return <Icon component={renderSvgIcon(svg, fill)} />;
}

export default IconPro;